from nextpy_org import styles
from nextpy_org.templates import template
import nextpy as xt

@template(route="Audio", title="4Components", description="9")
def audio() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/media/audio.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Avatar", title="4Components", description="9")
def avatar() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/media/avatar.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Icon", title="4Components", description="9")
def icon() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/media/icon.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Image", title="4Components", description="9")
def image() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/media/image.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

@template(route="Video", title="4Components", description="9")
def video() -> xt.Component:
    relative_path = 'nextpy_org/mdfiles/components/media/video.md'
    with open(relative_path, encoding="utf-8") as readme:
        content = readme.read()
    return xt.markdown(content, component_map=styles.markdown_style)

